<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<script>
function ren(){
	this.name='zhangsan';
	this.age=12;	
};
var zhangsan=new ren();
	//销毁对象
//alert(zhangsan.name);
//zhangsan=null
//alert(zhangsan.name);

	//删除对象的属性
//alert(zhangsan.name);
//delete zhangsan.name;
//alert(zhangsan.name);

	//遍历对象的属性
for(var i in zhangsan){
	//alert(typeof i)		//--> string
	alert(zhangsan[i])
};



</script>
</body>
</html>
